<template>
  <el-menu
    active-text-color="#ffd04b"
    background-color="#545c64"
    class="aside-container"
    :default-active="menuActive"
    text-color="#fff"
    @open="handleOpen"
    @close="handleClose"
    :style="{ width: !isCollapse ? '230px' : '64px' }"
    :collapse="isCollapse"
  >
    <p class="logo-lg">{{ isCollapse ? "DiDi" : "DiDi陪诊" }}</p>
    <AsideMenuTree :menuData="menuData" :index="1" />
  </el-menu>
</template>

<script setup>
import AsideMenuTree from "./asideMenuTree.vue";
import { useRouter } from "vue-router";
import { reactive, computed } from "vue";
import { useStore } from 'vuex';

const router = useRouter();
const store = useStore();
const handleOpen = () => {};
const handleClose = () => {};
const isCollapse = computed(() => store.state.Menu.isCollapse);
const menuActive = computed(() => store.state.Menu.menuActive)

// const menuData = reactive(router.options.routes[0].children);
// console.log(router, 'aside-router')
const menuData = computed(()=>store.state.Menu.routerList)// reactive(router.options.routes[0].children);
// console.log(menuData, 'aside-menuData')
</script>

<style lang="scss" scoped></style>
